package com.javaspeak.designpatterns.go4.structural.facade;


/**
 * The application class invokes methods on the ShapeFacade.
 * <p>
 * The ShapeFacade provides an API to the outside world.
 * <p>
 * Internally the ShapeFacade calls methods on other internal interfaces:
 * SquareBuilder and TriangleBuilder.
 *
 * @author John Dickerson
 */
public class ApplicationFacade {

    /**
     * Calls methods on the facade to retrieve shapes and prints them.
     */
    public void printShapes(){

        ShapeFacade shapeFacade = new ShapeFacadeImpl();
        System.out.println( shapeFacade.getSquare() );
        System.out.println( shapeFacade.getTriangle() );
    }


    /**
     * Main method
     *
     * @param args
     */
    public static void main( String[] args ){

        ApplicationFacade application = new ApplicationFacade();
        application.printShapes();
    }
}
